$(document).ready(function() {
	
	//开场第一屏动画开始
	
	setTimeout(function() {
		
		$(".section1 .zss_hengline").addClass("helinadd");
		
	}, 300);
	
	setTimeout(function() {
		
		$(".zss_syssec1 img").addClass("zss_syssec1imgplus");
		
		$(".section1 p").fadeIn(1000);
		
	}, 500);
	
	
	//开场第一屏动画结束
	
	$(".dowebok").fullpage({

		slidesColor: ['#FFFEF2', 'white', '#FFFEF2', 'white'],

		verticalCentered: true,

		anchors: ['page1', 'page2', 'page3', 'page4'],

		menu: '#zss_nav',

		//paddingTop: '3rem',

		scrollingSpeed: 600,

		easing: "easeOutCubic",

		navigation: true,

		css3: true,

		afterLoad: function(anchorLink, index) {
			
			if(index == '1') {

				$(".section1 .zss_hengline").addClass("helinadd");
				
				$(".zss_syssec1 p").fadeIn(1000);
				
				setTimeout(function(){
					$(".zss_syssec1 img").addClass("zss_syssec1imgplus");
				},500)

			}

			
			if(index == 2) {
				
				$(".section2 .zss_hengline").addClass("helinadd");
				
				$('.zss_wlwkztitle p').animate({

					left: '0'

				}, 1200, 'easeOutExpo');
				
				$('.zss_sec4boximg img').animate({

					left: '0'

				}, 1200, 'easeOutExpo');
					

			}

			if(index == 3) {
				
				$(".section3 .zss_hengline").addClass("helinadd");
				
				$('.zss_zhgn,.zss_zg img').addClass("zss_syssec1imgplus")
				
				
				
			}

			if(index == 4) {
				
				$(".section4 .zss_hengline").addClass("helinadd");
				
				
				$('.zss_wlwkztitle p').delay(300).animate({

					left: '0'

				}, 1200, 'easeOutExpo');
				
				$('.zss_sec4boximg img').delay(300).animate({

					left: '0'

				}, 1200, 'easeOutExpo');
				

			}
			
		},

		onLeave: function(index, direction) {
			
			if(index == '1') {
				
				$(".section1 .zss_hengline").removeClass("helinadd");
				
				$(".zss_syssec1 p").fadeOut(1000);
				
				setTimeout(function(){
					$(".zss_syssec1 img").removeClass("zss_syssec1imgplus");
				},400)
		

			}

			if(index == '2') {
				
				$(".section2 .zss_hengline").removeClass("helinadd");
				
				$('.zss_wlwkztitle p').delay(200).animate({

					left: '-100rem'

				}, 600, 'easeOutExpo');
				
				$('.zss_sec4boximg img').delay(300).animate({

					left: '100rem'

				}, 600, 'easeOutExpo');
					
			}

			if(index == '3') {
				
				$(".section3 .zss_hengline").removeClass("helinadd");
				
				setTimeout(function(){
					$('.zss_zhgn,.zss_zg img').removeClass("zss_syssec1imgplus")
				},500)

			}

			if(index == '4') {
				
				$(".section4 .zss_hengline").removeClass("helinadd");
				
				$('.zss_wlwkztitle p').delay(300).animate({

					left: '-100rem'

				}, 1, 'easeOutExpo');
				
				$('.zss_sec4boximg img').delay(300).animate({

					left: '100rem'

				}, 500, 'easeOutExpo');

			}
			
		}

	});


	
});